package com.hzit.listener;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@WebListener
public class MyApplicationListener implements ServletContextListener, ServletContextAttributeListener {

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		System.out.println("application被创建...");
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		System.out.println("application被销毁...");
	}
	@Override
	public void attributeAdded(ServletContextAttributeEvent event) {
		System.out.println("为application对象添加一个属性。。。");
	}

	@Override
	public void attributeRemoved(ServletContextAttributeEvent event) {
		System.out.println("从application对象移除一个属性。。。");
	}

	@Override
	public void attributeReplaced(ServletContextAttributeEvent event) {

	}

}
